3.2515 \(\int \frac{a+b x^n}{x} \, dx\)

Optimal. Leaf size=13 \[ a \log (x)+\frac{b x^n}{n} \]

[Out]

(b*x^n)/n + a*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0192118, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ a \log (x)+\frac{b x^n}{n} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.28882, size = 10, normalized size = 0.77 \[ a \log{\left (x \right )} + \frac{b x^{n}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*x**n)/x,x)

[Out]

a*log(x) + b*x**n/n

_______________________________________________________________________________________

Mathematica [A]  time = 0.00739225, size = 13, normalized size = 1. \[ a \log (x)+\frac{b x^n}{n} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0., size = 19, normalized size = 1.5 \[{\frac{a\ln \left ({x}^{n} \right ) }{n}}+{\frac{b{x}^{n}}{n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*x^n)/x,x)

[Out]

1/n*a*ln(x^n)+b*x^n/n

_______________________________________________________________________________________

Maxima [A]  time = 1.42045, size = 24, normalized size = 1.85 \[ \frac{b x^{n}}{n} + \frac{a \log \left (x^{n}\right )}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/x,x, algorithm="maxima")

[Out]

b*x^n/n + a*log(x^n)/n

_______________________________________________________________________________________

Fricas [A]  time = 0.224572, size = 20, normalized size = 1.54 \[ \frac{a n \log \left (x\right ) + b x^{n}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/x,x, algorithm="fricas")

[Out]

(a*n*log(x) + b*x^n)/n

_______________________________________________________________________________________

Sympy [A]  time = 0.473415, size = 17, normalized size = 1.31 \[ \begin{cases} a \log{\left (x \right )} + \frac{b x^{n}}{n} & \text{for}\: n \neq 0 \\\left (a + b\right ) \log{\left (x \right )} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*x**n)/x,x)

[Out]

Piecewise((a*log(x) + b*x**n/n, Ne(n, 0)), ((a + b)*log(x), True))

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{b x^{n} + a}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)/x, x)